#ifndef BVHTOVMD_H
#define BVHTOVMD_H

#include <QtGui/QMainWindow>
#include <qfiledialog.h>
#include "ui_bvhtovmd.h"

#include "BvhFile.h"
#include "VmdFile.h"
#include "PmdFile.h"

using namespace Eigen;

class BvhToVmd : public QMainWindow
{
	Q_OBJECT

public:
	BvhToVmd(QWidget *parent = 0, Qt::WFlags flags = 0);
	~BvhToVmd();

	double getModelScalingFactor();

public slots:
	void fileOpenBVH();
	void fileSaveAsVMD();
	void fileQuit();

private:
	Ui::BvhToVmdClass ui;
	QString m_bvhPath;
	QString m_vmdPath;

	BvhFile m_bvhFile;
	VmdFile m_vmdFile;

	void convertBvhToVmd();
	Vector4f calcQuatFromMatrix(const Matrix3f& mat);
};

#endif // BVHTOVMD_H
